package com.zhj.structure.tree.utils;

/**
 * @PackageName:com.zhj.structure.tree.utils
 * @ClassName:RedBlackTree
 * @auter: 朱慧杰
 * @date:2020/8/13 0013 16:32
 **/
public class RedBlackTree {

    private final int B = 1;
    private final int R = 0;

    private Node root;

    class Node {
        int data;
        int color = B;

        Node left;
        Node right;
        Node parent;

        public Node(int data) {
            this.data = data;
        }
    }

    public void leftRoate(Node node) {
        if (node.parent != null) {

        } else {
            // 因为没有父节点 表示为根节点
            Node right = root.right;
            root.right = right.left;
            right.left.parent = root;
            root.parent = right;
            right.parent = null;
            root = right;
        }
    }



}
